<?php

/*

   Aiesec's Alumni System - to manage data about Aiesec's Alumni and
   optimize the knowledge exchange between old and new members.
   Copyright (C) 2009 Vinicius Stein Dani

   This program is free software; you can redistribute it and/or
   modify it under the terms of the GNU General Public License
   as published by the Free Software Foundation; either version 2
   of the License, or (at your option) any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.

*/

/*
  
   Author: Vinicius Stein Dani
   Contact: viniciussdani@gmail.com
   Today is: May 25, 2009
   Location at this present moment: Santa Maria - RS - Brasil
  
*/

SESSION_START();

?>

<?php

   $id = $id_usuario;
            
   $a = mysql_query("SELECT * FROM person WHERE id_person = '$id'");
   $b = mysql_fetch_array($a);

   $name                    = $b['name'];
   $email                   = $b['email'];
   $password                = $b['password'];
   $passwordConfirmation    = $b['password'];
   $gender                  = $b['gender'];
   $birthdateDay            = date("d", $b['birthdate']);
   $birthdateMonth          = date("m", $b['birthdate']);
   $birthdateYear           = date("Y", $b['birthdate']);
   $phone                   = $b['phone'];
   $cellphone               = $b['cellphone'];
   $currentCity             = $b['currentCity'];
   $currentState            = $b['currentState'];
   $currentState            = $b['currentCountry'];
   $address                 = $b['address'];
   $addressNumber           = $b['addressNumber'];
   $addressComplement       = $b['addressComplement'];
   $contactMsn              = $b['contactMsn'];
   $contactOrkut            = $b['contactOrkut'];
   $contactFacebook         = $b['contactFacebook'];
   $entranceYear            = $b['entranceYear'];
   $exitYear                = $b['exitYear'];
   $leadershipRealized      = $b['leadershipRealized'];
   $traineeshipRealized     = $b['traineeshipRealized'];
   $conferenceParticipation = $b['conferenceParticipation'];
   
   $_SESSION['person_name'] = $name;
   $_SESSION['person_email'] = $email;
   $_SESSION['person_password'] = $password;
   $_SESSION['person_gender'] = $gender;
   $_SESSION['person_birthdateDay'] = $birthdateDay;
   $_SESSION['person_birthdateMonth'] = $birthdateMonth;
   $_SESSION['person_birthdateYear'] = $birthdateYear;
   $_SESSION['person_phone'] = $phone;
   $_SESSION['person_cellphone'] = $cellphone;
   $_SESSION['person_currentCity'] = $currentCity;
   $_SESSION['person_currentState'] = $currentState;
   $_SESSION['person_currentCountry'] = $currentCountry;
   $_SESSION['person_address'] = $address;
   $_SESSION['person_addressNumber'] = $addressNumber;
   $_SESSION['person_addressComplement'] = $addressComplement;
   $_SESSION['person_contactMsn'] = $contactMsn;
   $_SESSION['person_contactOrkut'] = $contactOrkut;
   $_SESSION['person_contactFacebook'] = $contactFacebook;
   $_SESSION['person_entranceYear'] = $entranceYear;
   $_SESSION['person_exitYear'] = $exitYear;
   $_SESSION['person_leadershipRealized'] = $leadershipRealized;
   $_SESSION['person_traineeshipRealized'] = $traineeshipRealized;
   $_SESSION['person_conferenceParticipation'] = $conferenceParticipation;

?>

  <form name="cadastro" id="cadastro" onSubmit="return valida();" action="<?php echo $_SERVER['PHPSELF']; ?>" method="post">
    <table border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td>
        
          <table border="0" cellpadding="0" cellspacing="5">
            <tr>
              <td><div style="font-size: 18px;">Dados pessoais</div>
              </td>
            </tr>
                                      
            <tr>
              <td width="260" align="left" valign="top">
                Name <br />
                <b><?php echo $_SESSION['person_name']; ?></b>
              </td>

              <td width="250" align="left" valign="top">
                E-mail/Login <br />
                <b><?php echo $_SESSION['person_email']; ?></b>
              </td>
            </tr>
                                                               
            <tr>
              <td align="left" valign="top">
                Gender <br />
                <b><?php echo $_SESSION['person_gender']; ?></b>
              </td>

              <td align="left" valign="top">
                Birthdate <br />
                <b><?php echo $_SESSION['person_birthdateDay']."/".$_SESSION['person_birthdateMonth']."/".$_SESSION['person_birthdateYear']; ?></b>                
              </td>
            </tr>
            
            <tr>
              <td align="left" valign="top">
                Phone <br />
                <b><?php echo $_SESSION['person_phone']; ?></b>
              </td>

              <td align="left" valign="top">
                Cellphone <br />
                <b><?php echo $_SESSION['person_cellphone']; ?></b>
              </td>
            </tr>

            <tr>
              <td align="left" valign="top">
                Current City <br />
                <b><?php echo $_SESSION['person_currentCity']; ?></b>
              </td>

              <td align="left" valign="top">
                Current State <br />
                <b><?php echo $_SESSION['person_currentState']; ?></b>
              </td>
            </tr>

            <tr>
              <td align="left" valign="top">
                Current Country <br />
                <b><?php echo $_SESSION['person_currentCountry']; ?></b>
              </td>

              <td align="left" valign="top">
              </td>
            </tr>

            <tr>
              <td align="left" valign="top">
                Address <br />
                <b><?php echo $_SESSION['person_address']; ?></b>
              </td>

              <td align="left" valign="top">
                Address Number <br />
                <b><?php echo $_SESSION['person_addressNumber']; ?></b>
              </td>
            </tr>

            <tr>
              <td align="left" valign="top">
                Address Complement <br />
                <b><?php echo $_SESSION['person_addressComplement']; ?></b>
              </td>

              <td align="left" valign="top">
                Contact MSN <br />
                <b><?php echo $_SESSION['person_contactMsn']; ?></b>
              </td>
            </tr>

            <tr>
              <td align="left" valign="top">
                Contact Orkut ( link ) <br />
                <b><?php echo "<a href=\"".$_SESSION['person_contactOrkut']."\" target=\"_blanck\">visite o link</a>"; ?></b>
              </td>

              <td align="left" valign="top">
                Contact Facebook ( link ) <br />
                <b><?php echo $_SESSION['person_contactFacebook']; ?></b>
              </td>
            </tr>

            <tr>
              <td align="left" valign="top">
                Entrance Year <br />
                <b><?php echo $_SESSION['person_entranceYear']; ?></b>
              </td>

              <td align="left" valign="top">
                Exit Year <br />
                <b><?php echo $_SESSION['person_exitYear']; ?></b>
              </td>
            </tr>

            <tr>
              <td align="left" valign="top">
                Leadership Realized <br />
                <b><?php if($_SESSION['person_leadershipRealized'] == "Y") echo "Yes"; ?>
                <?php if($_SESSION['person_leadershipRealized'] == "N") echo "No"; ?></b>
              </td>

              <td align="left" valign="top">
                Traineeship Realized <br />
                <b><?php if($_SESSION['person_traineeshipRealized'] == "Y") echo "Yes"; ?>
                <?php if($_SESSION['person_traineeshipRealized'] == "N") echo "No"; ?></b>
              </td>
            </tr>

            <tr>
              <td align="left" valign="top">
                Conference Participation <br />
                <b><?php if($_SESSION['person_conferenceParticipation'] == "Y") echo "Yes"; ?>
                <?php if($_SESSION['person_conferenceParticipation'] == "N") echo "No"; ?></b>
              </td>
              
              <td></td>
            </tr>                                                                                             
          </table>
          
        </td>
      </tr>
    </table>
  </form>